<!--
 * @Author: your name
 * @Date: 2021-08-25 11:00:59
 * @LastEditTime: 2021-09-09 20:24:12
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \musicapp\src\components\tobNav.vue
-->
<template>
  <div class="topNav">
      <div class="topLeft">
        <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-liebiao1"></use>
        </svg>
      </div>
      <div class="topCenter">
        <span class="navBtn" @click="$router.push('/me')">我的</span>
        <span class="navBtn active">发现</span>
        <span class="navBtn">云村</span>
        <span class="navBtn">视频</span>
      </div>
      <div class="topRight" @click="$router.push('/search')">
        <svg class="icon search" aria-hidden="true">
            <use xlink:href="#icon-sousuo"></use>
        </svg>
      </div>
    </div>
</template>

<script>
export default {
    name:'topNav'
}
</script>

<style lang="less" scoped>
.topNav{
    width: 7.5rem;
    height: 1rem;
    display: flex;
    justify-content: space-between;//水平分布，向两边靠，和中间有边距
    align-items: center;
    padding: 0 0.2rem;
    .icon{
        width: 0.5rem;
        height: 0.5rem;
    }
    .search{
        width: 0.45rem;
        height: 0.45rem;
    }
    .topCenter{
        width: 4.5rem;
        display: flex;
        justify-content: space-around;//水平平均分布
        .active{
            font-weight: 900;
        }
    }
}
</style>